.Dd February 27, 2019
.Dt libcdirectory 3
.Os libcdirectory
.Sh NAME
.Nm libcdirectory.h
.Nd Library to support cross-platform C directory functions
.Sh SYNOPSIS
.In libcdirectory.h
.Pp
Support functions
.Ft const char *
.Fn libcdirectory_get_version "void"
.Ft int
.Fn libcdirectory_get_codepage "int *codepage" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_set_codepage "int codepage" "libcdirectory_error_t **error"
.Pp
Error functions
.Ft void
.Fn libcdirectory_error_free "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_error_fprint "libcdirectory_error_t *error" "FILE *stream"
.Ft int
.Fn libcdirectory_error_sprint "libcdirectory_error_t *error" "char *string" "size_t size"
.Ft int
.Fn libcdirectory_error_backtrace_fprint "libcdirectory_error_t *error" "FILE *stream"
.Ft int
.Fn libcdirectory_error_backtrace_sprint "libcdirectory_error_t *error" "char *string" "size_t size"
.Pp
Directory functions
.Ft int
.Fn libcdirectory_directory_initialize "libcdirectory_directory_t **directory" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_free "libcdirectory_directory_t **directory" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_open "libcdirectory_directory_t *directory" "const char *directory_name" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_close "libcdirectory_directory_t *directory" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_read_entry "libcdirectory_directory_t *directory" "libcdirectory_directory_entry_t *directory_entry" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_has_entry "libcdirectory_directory_t *directory" "libcdirectory_directory_entry_t *directory_entry" "const char *entry_name" "size_t entry_name_length" "uint8_t entry_type" "uint8_t compare_flags" "libcdirectory_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libcdirectory_directory_open_wide "libcdirectory_directory_t *directory" "const wchar_t *directory_name" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_has_entry_wide "libcdirectory_directory_t *directory" "libcdirectory_directory_entry_t *directory_entry" "const wchar_t *entry_name" "size_t entry_name_length" "uint8_t entry_type" "uint8_t compare_flags" "libcdirectory_error_t **error"
.Pp
Directory entry functions
.Ft int
.Fn libcdirectory_directory_entry_initialize "libcdirectory_directory_entry_t **directory_entry" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_entry_free "libcdirectory_directory_entry_t **directory_entry" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_entry_get_type "libcdirectory_directory_entry_t *directory_entry" "uint8_t *type" "libcdirectory_error_t **error"
.Ft int
.Fn libcdirectory_directory_entry_get_name "libcdirectory_directory_entry_t *directory_entry" "char **name" "libcdirectory_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libcdirectory_directory_entry_get_name_wide "libcdirectory_directory_entry_t *directory_entry" "wchar_t **name" "libcdirectory_error_t **error"
.Sh DESCRIPTION
The
.Fn libcdirectory_get_version
function is used to retrieve the library version.
.Sh RETURN VALUES
Most of the functions return NULL or \-1 on error, dependent on the return type.
For the actual return values see "libcdirectory.h".
.Sh ENVIRONMENT
None
.Sh FILES
None
.Sh NOTES
libcdirectory can be compiled with wide character support (wchar_t).
.sp
To compile libcdirectory with wide character support use:
.Ar ./configure --enable-wide-character-type=yes
 or define:
.Ar _UNICODE
 or
.Ar UNICODE
 during compilation.
.sp
.Ar LIBCDIRECTORY_WIDE_CHARACTER_TYPE
 in libcdirectory/features.h can be used to determine if libcdirectory was compiled with wide character support.
.Sh BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libcdirectory/issues
.Sh AUTHOR
These man pages are generated from "libcdirectory.h".
.Sh COPYRIGHT
Copyright (C) 2008-2024, Joachim Metz <joachim.metz@gmail.com>.
.sp
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.Sh SEE ALSO
the libcdirectory.h include file
